package com.ftg.learn.chapter15.factorypattern.shape;

/**
 * @author KangJx
 * @date 2021/7/28
 */
public class Dog implements Shape,Cloneable {

    @Override
    public void draw() {
        System.out.println("史努比....");
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Dog d1 = new Dog();
        Dog d2 = new Dog();
        System.out.println(d1 == d2);
        Dog d3 = (Dog)d1.clone();
        System.out.println(d1 == d3);
    }
}
